%Snap-on Force
SF_G=[60.17 49.12 56.89 40.20]; % Tip 14,18,19,24 - GO
SF_1rG=[126.96 127.62 173.09 116.53]; %Tip 14,18,19,24 - rGO1
SF_10rG=[137.02 133.52 195.76]; %Tip 14,18,19 - rGO10

%Snap-on displacement
SD_G=[0.84 0.92 1.05 1.12]; %Tip14,18,19,24 - GO
SD_1rG=[2.48 1.77 2.07 1.86]; %Tip 14,18,19,24 - rGO1
SD_10rG=[2.61 2.67 2.79]; %Tip 14,18,19 - rGO10

%Pull-off displacement
PD_G=[3.95 3.20 4.30 3.59]; %Tip 14,18,19,24 - GO
PD_1rG=[6.30 5.76 5.59 5.41]; %Tip 14,18,19,24 - rGO1
PD_10rG=[6.58 5.84 5.82]; %Tip 14,18,19 - rGO10


% Average snap in force values and their errors  of GO, rGO1 and rGO10

SF=[mean(SF_G) mean(SF_1rG) mean(SF_10rG)] %Average snap-on force values 
err_SF=[std(SF_G) std(SF_1rG) std(SF_10rG)] %Errors of average snap-on force values 

SD=[mean(SD_G) mean(SD_1rG) mean(SD_10rG)] %Average snap-on displacement values
err_SD=[std(SD_G) std(SD_1rG) std(SD_10rG)] %Errors of average snap-on distance values

PD=[mean(PD_G) mean(PD_1rG) mean(PD_10rG)] %Average pull-off displacement values
err_PD=[std(PD_G) std(PD_1rG) std(PD_10rG)] %Errors of average pull-off distance values



fig = figure;
left_color = [1 0 0];
right_color = [0 0 1];
set(fig,'defaultAxesColorOrder',[left_color; right_color]);

yyaxis left
x=[0.9 1.9 2.9];
plot(x,SD,'.r-','MarkerSize',15,'Color','r','LineWidth',0.7)
%errorbar(x,SD,err_SD,'Color','r','LineWidth',0.7) %Plot average snap-on displacement values with errors
ylabel('Average Snap on Displacement (\mum)')

hold on
% Tip 14
x=[0.85 1.85 2.85];
SD=[0.84 2.48 2.61];
plot(x,SD,'*r', 'MarkerSize',10)

hold on
% Tip 18
x=[0.85 1.85 2.85];
SD=[0.92 1.77 2.67];
plot(x,SD,'xr','MarkerSize',10)

hold on
% Tip 19
x=[0.95 1.95 2.95];
SD=[1.05 2.07 2.79];
plot(x,SD,'or','MarkerSize',8)

hold on
% Tip 24
x=[0.95 1.95];
SD=[1.12 1.86];
plot(x,SD,'sr','MarkerSize',10)

hold on

yyaxis right
x=[1.1 2.1 3.1];
plot(x,PD,'.b-','MarkerSize',15,'Color','b','LineWidth',0.7)
%errorbar(x,PD,err_PD,'Color','b','LineWidth',0.7) %Plot average pull-off displacement values with errors
ylabel('Average Pull-off Displacement (\mum)')
xlabel('Reduction time (min)')
xticks([0 1 2 3 4])
xticklabels({' ','0','1','10',' '})

hold on
% Tip 14
x=[1.05 2.05 3.05];
PD=[3.95 6.30 6.58];
plot(x,PD,'*b','MarkerSize',10)

hold on
% Tip 18
x=[1.05 2.05 3.05];
PD=[3.20 5.76 5.84];
plot(x,PD,'xb','MarkerSize',10)

hold on
% Tip 19
x=[1.15 2.15 3.15];
PD=[4.30 5.59 5.82];
plot(x,PD,'ob','MarkerSize',8)

hold on
% Tip 24
x=[1.15 2.15];
PD=[3.59 5.41];
plot(x,PD,'sb','MarkerSize',10)


figure

x=[1 2 3]
%errorbar(x,SF,err_SF,'Color','black','LineWidth',0.7)
plot(x,SF,'.k-','MarkerSize',15,'Color','k','LineWidth',0.7)
ylabel('Average Snap on Force (nN)') %Plot average snap-on forces with errors
xlabel('Reduction time (min)')
xticks([0 1 2 3 4])
xticklabels({' ','0','1','10',' '})

hold on
% Tip 14
x=[0.95 1.95 2.95];
SF=[60.17 126.96 137.02];
plot(x,SF,'*k','MarkerSize',10)

hold on
% Tip 18
x=[0.95 1.95 2.95];
SF=[49.12 127.62 133.52];
plot(x,SF,'xk','MarkerSize',10)

hold on
% Tip 19
x=[1.05 2.05 3.05];
SF=[56.89 173.09 195.76];
plot(x,SF,'ok','MarkerSize',8)

hold on
% Tip 24
x=[1.05 2.05];
SF=[40.20 116.53];
plot(x,SF,'sk','MarkerSize',10)